<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pin: Controlling and Initializing</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pin
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Controlling and Initializing<div class="ingroups"><a class="el" href="group__API__REF.html">Instrumentation API Reference</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCALL__APPLICATION__FUNCTION__PARAM.html">CALL_APPLICATION_FUNCTION_PARAM</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga48e4c80589225d40efe177a9d399225c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group__PIN__CONTROL.html#ga8c5c16fb133375efa3a27d3a3900c603">EXCEPT_HANDLING_RESULT</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, <a class="el" href="structPHYSICAL__CONTEXT.html">PHYSICAL_CONTEXT</a> *pPhysCtxt, VOID *v)</td></tr>
<tr class="separator:ga48e4c80589225d40efe177a9d399225c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga943bbe3eeb81be27f127382e4b3f82bb"><td class="memItemLeft" align="right" valign="top">typedef VOID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a></td></tr>
<tr class="separator:ga943bbe3eeb81be27f127382e4b3f82bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd9a69f9525e3ff6b422dabd230cf63c"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gabd9a69f9525e3ff6b422dabd230cf63c">REMOVE_INSTRUMENTATION_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:gabd9a69f9525e3ff6b422dabd230cf63c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3">DETACH_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d1917077e6365cb55f94a8cd1747b7f"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga2d1917077e6365cb55f94a8cd1747b7f">DETACH_PROBED_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:ga2d1917077e6365cb55f94a8cd1747b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab167aa6770e560c4cae763d950104e18"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab167aa6770e560c4cae763d950104e18">ATTACH_PROBED_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:gab167aa6770e560c4cae763d950104e18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga06536b5ceeac39f951acd0541f33d6e0"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga06536b5ceeac39f951acd0541f33d6e0">ATTACH_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:ga06536b5ceeac39f951acd0541f33d6e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae749c259c2759db886e1afbbffb8c11a"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gae749c259c2759db886e1afbbffb8c11a">APPLICATION_START_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:gae749c259c2759db886e1afbbffb8c11a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga47618aec52f2e6918ca0ffce8fefabde"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga47618aec52f2e6918ca0ffce8fefabde">PREPARE_FOR_FINI_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:ga47618aec52f2e6918ca0ffce8fefabde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8978f19f9ba6f66dcb9ab0763a32927c"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga8978f19f9ba6f66dcb9ab0763a32927c">FINI_CALLBACK</a>) (INT32 code, VOID *v)</td></tr>
<tr class="separator:ga8978f19f9ba6f66dcb9ab0763a32927c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab6073f3d7826fab0acd80622e7daf4a"><td class="memItemLeft" align="right" valign="top">typedef size_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaab6073f3d7826fab0acd80622e7daf4a">FETCH_CALLBACK</a>) (void *buf, ADDRINT addr, size_t size, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, VOID *v)</td></tr>
<tr class="separator:gaab6073f3d7826fab0acd80622e7daf4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdfc14fff9d077c1c56019a71763d30f"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gafdfc14fff9d077c1c56019a71763d30f">OUT_OF_MEMORY_CALLBACK</a>) (size_t size, VOID *v)</td></tr>
<tr class="separator:gafdfc14fff9d077c1c56019a71763d30f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a5f26e35e32bc5e99d101995339bd73"><td class="memItemLeft" align="right" valign="top">typedef ADDRINT(<a class="el" href="group__INST__ARGS.html#ga5d3025eb005b7ea4745799f0ee1b86a6">PIN_FAST_ANALYSIS_CALL</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a>) (<a class="el" href="structPIN__MEM__TRANS__INFO.html">PIN_MEM_TRANS_INFO</a> *memTransInfo, VOID *v)</td></tr>
<tr class="separator:ga3a5f26e35e32bc5e99d101995339bd73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37b2fde2c0e113f45b69347032225840"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga37b2fde2c0e113f45b69347032225840">FORK_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadid, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td></tr>
<tr class="separator:ga37b2fde2c0e113f45b69347032225840"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga848885f455ca7e4000cbe34359851a53"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga848885f455ca7e4000cbe34359851a53">THREAD_START_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, INT32 flags, VOID *v)</td></tr>
<tr class="separator:ga848885f455ca7e4000cbe34359851a53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad66d9075769a0573e43721a1fb0c3e5e"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gad66d9075769a0573e43721a1fb0c3e5e">THREAD_ATTACH_PROBED_CALLBACK</a>) (VOID *sigmask, VOID *v)</td></tr>
<tr class="separator:gad66d9075769a0573e43721a1fb0c3e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac799b787468a308c8fe33345a74403b3"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gac799b787468a308c8fe33345a74403b3">THREAD_DETACH_PROBED_CALLBACK</a>) (VOID *v)</td></tr>
<tr class="separator:gac799b787468a308c8fe33345a74403b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe174c8e7f51d02d96b572a3253ba2e4"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gafe174c8e7f51d02d96b572a3253ba2e4">THREAD_ATTACH_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td></tr>
<tr class="separator:gafe174c8e7f51d02d96b572a3253ba2e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c72b4a2e0ec256e8811ad82bfb3c71c"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga5c72b4a2e0ec256e8811ad82bfb3c71c">THREAD_DETACH_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td></tr>
<tr class="separator:ga5c72b4a2e0ec256e8811ad82bfb3c71c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99a915108f24a372d07d45560db7fa87"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga99a915108f24a372d07d45560db7fa87">THREAD_FINI_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, INT32 code, VOID *v)</td></tr>
<tr class="separator:ga99a915108f24a372d07d45560db7fa87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf00c74890a27774b6f9dad0f8267b720"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaf00c74890a27774b6f9dad0f8267b720">CONTEXT_CHANGE_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="group__PIN__CONTROL.html#ga8e4e6511a0e09fdc5ec7d6dbf395b3a8">CONTEXT_CHANGE_REASON</a> reason, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *from, <a class="el" href="structCONTEXT.html">CONTEXT</a> *to, INT32 info, VOID *v)</td></tr>
<tr class="separator:gaf00c74890a27774b6f9dad0f8267b720"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2eccf99d56cf9ac54001dc2f1c7a559"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gae2eccf99d56cf9ac54001dc2f1c7a559">INTERCEPT_SIGNAL_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, INT32 sig, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, BOOL hasHandler, const <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, VOID *v)</td></tr>
<tr class="separator:gae2eccf99d56cf9ac54001dc2f1c7a559"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab142a18b094055ca96bce4493a70c9ef"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab142a18b094055ca96bce4493a70c9ef">FORK_PROBE_MODE_CALLBACK</a>) (UINT32 childPid, VOID *v)</td></tr>
<tr class="separator:gab142a18b094055ca96bce4493a70c9ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga32ad8725a818ddded04963a3b35a317c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga32ad8725a818ddded04963a3b35a317c">SYMBOL_INFO_MODE</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga32ad8725a818ddded04963a3b35a317ca638dc98de833dc4037e14bc6b0e2293d">NO_SYMBOLS</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga32ad8725a818ddded04963a3b35a317ca7deba6e46686ecdd822e1481e3fa32ef">EXPORT_SYMBOLS</a> = (1 &lt;&lt; 0), 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga32ad8725a818ddded04963a3b35a317ca69ec95d319e1326991d9a661c7b5a349">DEBUG_SYMBOLS</a> = (1 &lt;&lt; 1), 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga32ad8725a818ddded04963a3b35a317ca1c55b53fa60ae1040208433b28c4f833">IFUNC_SYMBOLS</a> = (1 &lt;&lt; 2), 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga32ad8725a818ddded04963a3b35a317ca377cc21f8510135927d79a96d656a726">DEBUG_OR_EXPORT_SYMBOLS</a> = (DEBUG_SYMBOLS | EXPORT_SYMBOLS)
<br />
 }</td></tr>
<tr class="separator:ga32ad8725a818ddded04963a3b35a317c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab28152f755e5215a5e9ef343054e152e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab28152f755e5215a5e9ef343054e152e">REPLAY_MODE</a> { <br />
&#160;&#160;<b>REPLAY_MODE_NONE</b> = 0x00, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#ggab28152f755e5215a5e9ef343054e152eac9edf1a9d0e893b11600c3667543994e">REPLAY_MODE_IMAGEOPS</a> = 0x01, 
<br />
&#160;&#160;<b>REPLAY_MODE_ALL</b> = REPLAY_MODE_IMAGEOPS
<br />
 }</td></tr>
<tr class="separator:gab28152f755e5215a5e9ef343054e152e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1079583ef7d0d89098794aaafc2cdd7f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga1079583ef7d0d89098794aaafc2cdd7f">SMC_ENABLE_DISABLE_TYPE</a> { <br />
&#160;&#160;<b>SMC_ENABLE</b>, 
<br />
&#160;&#160;<b>SMC_DISABLE</b>
<br />
 }</td></tr>
<tr class="separator:ga1079583ef7d0d89098794aaafc2cdd7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2114b4480d050e1b7c8ac63449610448"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga2114b4480d050e1b7c8ac63449610448ae15497466a8ecc6bddc4becc933efa12">FPOINT_BEFORE</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga2114b4480d050e1b7c8ac63449610448a76673c60a3c5d0f8beebffc3679552b3">FPOINT_AFTER_IN_PARENT</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga2114b4480d050e1b7c8ac63449610448a545c2194fff97c1159b8872ba4632a2b">FPOINT_AFTER_IN_CHILD</a>
<br />
 }</td></tr>
<tr class="separator:ga2114b4480d050e1b7c8ac63449610448"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga04847a38918bb66387b616e2dac6e291"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga04847a38918bb66387b616e2dac6e291a37b8fca2f05c816ab237c1cdb72adb0c">ATTACH_INITIATED</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga04847a38918bb66387b616e2dac6e291af2ccbdc4611e742b0fdc7de09455b8b9">ATTACH_FAILED_DETACH</a>
<br />
 }</td></tr>
<tr class="separator:ga04847a38918bb66387b616e2dac6e291"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e4e6511a0e09fdc5ec7d6dbf395b3a8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga8e4e6511a0e09fdc5ec7d6dbf395b3a8">CONTEXT_CHANGE_REASON</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8ae712c798df1d0e94022f6382a4c8239e">CONTEXT_CHANGE_REASON_FATALSIGNAL</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a43b8b032e969e0e5d14a3ed7385f29db">CONTEXT_CHANGE_REASON_SIGNAL</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a7e8b6943c9aa3a85b0a9cd23bc738dd9">CONTEXT_CHANGE_REASON_SIGRETURN</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a641c250ce491d66cc19f1205160dc279">CONTEXT_CHANGE_REASON_APC</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8ae4c034a98f8eba91b2f8ac5b2543492b">CONTEXT_CHANGE_REASON_EXCEPTION</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a5b48097c22e4fcfdf12650129f364b50">CONTEXT_CHANGE_REASON_CALLBACK</a>
<br />
 }</td></tr>
<tr class="separator:ga8e4e6511a0e09fdc5ec7d6dbf395b3a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c5c16fb133375efa3a27d3a3900c603"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga8c5c16fb133375efa3a27d3a3900c603">EXCEPT_HANDLING_RESULT</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8c5c16fb133375efa3a27d3a3900c603a32e365f541f4ea48f730a030185558cd">EHR_HANDLED</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8c5c16fb133375efa3a27d3a3900c603ab394692e0b4ad2fda77e7597c75c9599">EHR_UNHANDLED</a>, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga8c5c16fb133375efa3a27d3a3900c603a1950501612b017bd8db1634f7dc8bf8f">EHR_CONTINUE_SEARCH</a>
<br />
 }</td></tr>
<tr class="separator:ga8c5c16fb133375efa3a27d3a3900c603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4e114852e46d5d839d6e71e242709777"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga4e114852e46d5d839d6e71e242709777">PIN_CALLBACK_TYPE</a> { <br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga4e114852e46d5d839d6e71e242709777af6f04d87615566deb3bd49ec1e3468ef">PIN_CALLBACK_TYPE_NONE</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__PIN__CONTROL.html#gga4e114852e46d5d839d6e71e242709777ae9e0416b9e54e38bc1cf69956f81bc2c">PIN_CALLBACK_TYPE_SYSCALL</a> = 1
<br />
 }</td></tr>
<tr class="separator:ga4e114852e46d5d839d6e71e242709777"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae710eef7b08de1d153a0b7f3469175a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gae710eef7b08de1d153a0b7f3469175a0">PIN_AddFollowChildProcessFunction</a> (<a class="el" href="group__PIN__PROCESS.html#gabccd10f8f7203db2476f28a5c3a8f75b">FOLLOW_CHILD_PROCESS_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gae710eef7b08de1d153a0b7f3469175a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga497983e81c1cfaf15866667e31eee791"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga497983e81c1cfaf15866667e31eee791">PIN_AddInternalExceptionHandler</a> (<a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga497983e81c1cfaf15866667e31eee791"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga745439a3c54413e886db6676ff6a8bae"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga745439a3c54413e886db6676ff6a8bae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab6d4fa955364407511e161e7ed81d65d"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid)</td></tr>
<tr class="separator:gab6d4fa955364407511e161e7ed81d65d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe7c14403bb052dab2caf316db743684"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gafe7c14403bb052dab2caf316db743684">PIN_IsProbeMode</a> ()</td></tr>
<tr class="separator:gafe7c14403bb052dab2caf316db743684"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad2d0a8d8dca408952f4a48ebcd0a2a3"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaad2d0a8d8dca408952f4a48ebcd0a2a3">PIN_IsAttaching</a> ()</td></tr>
<tr class="separator:gaad2d0a8d8dca408952f4a48ebcd0a2a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5804cf309051f916da872b279ca46568"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga5804cf309051f916da872b279ca46568">PIN_IsSafeForProbedInsertion</a> (ADDRINT addr)</td></tr>
<tr class="separator:ga5804cf309051f916da872b279ca46568"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d4d951d45a58249064a42396f4b6610"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga7d4d951d45a58249064a42396f4b6610">PIN_InsertCallProbed</a> (ADDRINT addr, AFUNPTR funptr,...)</td></tr>
<tr class="separator:ga7d4d951d45a58249064a42396f4b6610"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga33db0442eb244110a6355ddc4d98cab8"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga33db0442eb244110a6355ddc4d98cab8">PIN_SetReplayMode</a> (UINT32 flags)</td></tr>
<tr class="separator:ga33db0442eb244110a6355ddc4d98cab8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga49581d3c0504c1b73c135c2ea58ce514"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga49581d3c0504c1b73c135c2ea58ce514">PIN_LockClient</a> ()</td></tr>
<tr class="separator:ga49581d3c0504c1b73c135c2ea58ce514"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28de790a20fcd1a8fd572a96e9c0064b"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga28de790a20fcd1a8fd572a96e9c0064b">PIN_UnlockClient</a> ()</td></tr>
<tr class="separator:ga28de790a20fcd1a8fd572a96e9c0064b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38f5a396edc14c80c3bd2c0b91084153"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction</a> (const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a> cstype, AFUNPTR origFunPtr, <a class="el" href="structCALL__APPLICATION__FUNCTION__PARAM.html">CALL_APPLICATION_FUNCTION_PARAM</a> *param,...)</td></tr>
<tr class="separator:ga38f5a396edc14c80c3bd2c0b91084153"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa78c7b560975a6feffa420fadedc0627"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaa78c7b560975a6feffa420fadedc0627">PIN_AddFiniFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga8978f19f9ba6f66dcb9ab0763a32927c">FINI_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gaa78c7b560975a6feffa420fadedc0627"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd670ecd04074a3962968de22aab247c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gacd670ecd04074a3962968de22aab247c">PIN_AddPrepareForFiniFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga47618aec52f2e6918ca0ffce8fefabde">PREPARE_FOR_FINI_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gacd670ecd04074a3962968de22aab247c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22abc469fb3a124bf69f80111f6fdef7"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga22abc469fb3a124bf69f80111f6fdef7">PIN_AddFetchFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gaab6073f3d7826fab0acd80622e7daf4a">FETCH_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga22abc469fb3a124bf69f80111f6fdef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd8df83bbd040dfaf019bf18ec072b92"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gabd8df83bbd040dfaf019bf18ec072b92">PIN_FetchCode</a> (void *copyBuf, const VOID *address, size_t maxSize, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo)</td></tr>
<tr class="separator:gabd8df83bbd040dfaf019bf18ec072b92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77187fb76889090655ab0881ee096911"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga77187fb76889090655ab0881ee096911">PIN_AddOutOfMemoryFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gafdfc14fff9d077c1c56019a71763d30f">OUT_OF_MEMORY_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga77187fb76889090655ab0881ee096911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ddee86f9c82dd00f07123dfc21a58ed"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga6ddee86f9c82dd00f07123dfc21a58ed">PIN_AddMemoryAddressTransFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga6ddee86f9c82dd00f07123dfc21a58ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga438d523bfee1f6296d252508ec564ac6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga438d523bfee1f6296d252508ec564ac6">PIN_GetMemoryAddressTransFunction</a> ()</td></tr>
<tr class="separator:ga438d523bfee1f6296d252508ec564ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7501b4226bc92f358b7b361eea0929d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga7501b4226bc92f358b7b361eea0929d2">PIN_AddDetachFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3">DETACH_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga7501b4226bc92f358b7b361eea0929d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4710100bcce91bdc5fc67bf8f918123a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga4710100bcce91bdc5fc67bf8f918123a">PIN_AddDetachFunctionProbed</a> (<a class="el" href="group__PIN__CONTROL.html#ga2d1917077e6365cb55f94a8cd1747b7f">DETACH_PROBED_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga4710100bcce91bdc5fc67bf8f918123a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga984b4424d9ebf819ad6045894adbce38"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga984b4424d9ebf819ad6045894adbce38">PIN_AddThreadStartFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga848885f455ca7e4000cbe34359851a53">THREAD_START_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga984b4424d9ebf819ad6045894adbce38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00eaa74b7c902c85fa80ca9f7983c896"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga00eaa74b7c902c85fa80ca9f7983c896">PIN_AddThreadAttachProbedFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gad66d9075769a0573e43721a1fb0c3e5e">THREAD_ATTACH_PROBED_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga00eaa74b7c902c85fa80ca9f7983c896"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4f2f9e67165b011a3eadedc97fa3d67"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaf4f2f9e67165b011a3eadedc97fa3d67">PIN_AddThreadAttachFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gafe174c8e7f51d02d96b572a3253ba2e4">THREAD_ATTACH_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gaf4f2f9e67165b011a3eadedc97fa3d67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga31c0ce7e402dbbd3c5fc4b926a5ef391"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga31c0ce7e402dbbd3c5fc4b926a5ef391">PIN_AddThreadDetachProbedFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gac799b787468a308c8fe33345a74403b3">THREAD_DETACH_PROBED_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga31c0ce7e402dbbd3c5fc4b926a5ef391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa44e9c96f499d7ed333d7aa0b9518f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaa44e9c96f499d7ed333d7aa0b9518f3b">PIN_AddThreadDetachFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga5c72b4a2e0ec256e8811ad82bfb3c71c">THREAD_DETACH_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gaa44e9c96f499d7ed333d7aa0b9518f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga785776d108a7843f983698509eceefc9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga785776d108a7843f983698509eceefc9">PIN_AddApplicationStartFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gae749c259c2759db886e1afbbffb8c11a">APPLICATION_START_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga785776d108a7843f983698509eceefc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4d7046de9ac2cc919910ca3293d2db6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gad4d7046de9ac2cc919910ca3293d2db6">PIN_AddThreadFiniFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga99a915108f24a372d07d45560db7fa87">THREAD_FINI_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gad4d7046de9ac2cc919910ca3293d2db6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cc0f28140cb83a035ebabdddf81861f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga1cc0f28140cb83a035ebabdddf81861f">PIN_AddContextChangeFunction</a> (<a class="el" href="group__PIN__CONTROL.html#gaf00c74890a27774b6f9dad0f8267b720">CONTEXT_CHANGE_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga1cc0f28140cb83a035ebabdddf81861f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3463df5a1390b87e8a4568d6f2f43df9"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga3463df5a1390b87e8a4568d6f2f43df9">PIN_InterceptSignal</a> (INT32 sig, <a class="el" href="group__PIN__CONTROL.html#gae2eccf99d56cf9ac54001dc2f1c7a559">INTERCEPT_SIGNAL_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga3463df5a1390b87e8a4568d6f2f43df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5dcf8bb7f5a70b12746c18bbbe5668f9"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga5dcf8bb7f5a70b12746c18bbbe5668f9">PIN_UnblockSignal</a> (INT32 sig, BOOL enable)</td></tr>
<tr class="separator:ga5dcf8bb7f5a70b12746c18bbbe5668f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea4e808e786d55b6f833e087586548ff"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaea4e808e786d55b6f833e087586548ff">PIN_SetSmcSupport</a> (<a class="el" href="group__PIN__CONTROL.html#ga1079583ef7d0d89098794aaafc2cdd7f">SMC_ENABLE_DISABLE_TYPE</a> enable_disable)</td></tr>
<tr class="separator:gaea4e808e786d55b6f833e087586548ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad29e508159c002cafcb389624595ffba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gad29e508159c002cafcb389624595ffba">PIN_AddForkFunction</a> (<a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a> point, <a class="el" href="group__PIN__CONTROL.html#ga37b2fde2c0e113f45b69347032225840">FORK_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gad29e508159c002cafcb389624595ffba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8fb8aae9e4b8012ab3c00225761c7785"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga8fb8aae9e4b8012ab3c00225761c7785">PIN_RemoveInstrumentation</a> ()</td></tr>
<tr class="separator:ga8fb8aae9e4b8012ab3c00225761c7785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40c83d7076e7be3ebc6cc8eff6cd6a6a"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga40c83d7076e7be3ebc6cc8eff6cd6a6a">PIN_RemoveInstrumentationInRange</a> (ADDRINT start, ADDRINT end)</td></tr>
<tr class="separator:ga40c83d7076e7be3ebc6cc8eff6cd6a6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabcb114d9f01002dac1be6607da8b7c2c"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gabcb114d9f01002dac1be6607da8b7c2c">PIN_RemoveFiniFunctions</a> ()</td></tr>
<tr class="separator:gabcb114d9f01002dac1be6607da8b7c2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga10440b20ad6bfca57c18652f61031731"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach</a> ()</td></tr>
<tr class="separator:ga10440b20ad6bfca57c18652f61031731"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac0f5ea28f49b4cd28101140f021c7f71"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gac0f5ea28f49b4cd28101140f021c7f71">PIN_Attach</a> (<a class="el" href="group__PIN__CONTROL.html#ga06536b5ceeac39f951acd0541f33d6e0">ATTACH_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gac0f5ea28f49b4cd28101140f021c7f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2fdaea6bac0c3a75e73d2692fd16b8e"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaf2fdaea6bac0c3a75e73d2692fd16b8e">PIN_DetachProbed</a> ()</td></tr>
<tr class="separator:gaf2fdaea6bac0c3a75e73d2692fd16b8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gababd11163709312e34584227d6a3994a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gababd11163709312e34584227d6a3994a">PIN_AttachProbed</a> (<a class="el" href="group__PIN__CONTROL.html#gab167aa6770e560c4cae763d950104e18">ATTACH_PROBED_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:gababd11163709312e34584227d6a3994a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga614df849c7bcb0f5ad0c01f98b39dad3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga614df849c7bcb0f5ad0c01f98b39dad3">PIN_CreateDefaultConfigurationInfo</a> ()</td></tr>
<tr class="separator:ga614df849c7bcb0f5ad0c01f98b39dad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf30fb0e2832f9ce1016b9c751547d17"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaaf30fb0e2832f9ce1016b9c751547d17">PIN_SetAllowedConcurrentCallbacks</a> (<a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a> options, <a class="el" href="group__PIN__CONTROL.html#ga4e114852e46d5d839d6e71e242709777">PIN_CALLBACK_TYPE</a> callbackType)</td></tr>
<tr class="separator:gaaf30fb0e2832f9ce1016b9c751547d17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab466cd00518ff315446c92f98f7ea1a0"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram</a> (<a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a> options=<a class="el" href="group__PIN__CONTROL.html#ga614df849c7bcb0f5ad0c01f98b39dad3">PIN_CreateDefaultConfigurationInfo</a>())</td></tr>
<tr class="separator:gab466cd00518ff315446c92f98f7ea1a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e545d491302b50ea78c1bb844a8b544"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed</a> ()</td></tr>
<tr class="separator:ga2e545d491302b50ea78c1bb844a8b544"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab50450a575d888a98f46c3c5441aa360"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gab50450a575d888a98f46c3c5441aa360">PIN_Version</a> ()</td></tr>
<tr class="separator:gab50450a575d888a98f46c3c5441aa360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade9cf860942a12f2f81eff43be7861f4"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gade9cf860942a12f2f81eff43be7861f4">PIN_Init</a> (INT32 argc, CHAR **argv)</td></tr>
<tr class="separator:gade9cf860942a12f2f81eff43be7861f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf372d34ecbc62763aa07af2b9c24f1ea"><td class="memItemLeft" align="right" valign="top">CHAR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gaf372d34ecbc62763aa07af2b9c24f1ea">PIN_VmFullPath</a> ()</td></tr>
<tr class="separator:gaf372d34ecbc62763aa07af2b9c24f1ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3c221c041135a3a62384cde05828e785"><td class="memItemLeft" align="right" valign="top">const CHAR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga3c221c041135a3a62384cde05828e785">PIN_ToolFullPath</a> ()</td></tr>
<tr class="separator:ga3c221c041135a3a62384cde05828e785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1225706d213f4bd1d81ed1fb32e792d7"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga1225706d213f4bd1d81ed1fb32e792d7">PIN_SafeCopy</a> (VOID *dst, const VOID *src, size_t size)</td></tr>
<tr class="separator:ga1225706d213f4bd1d81ed1fb32e792d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ca9a29ec02d848dd7b95717f400098c"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga9ca9a29ec02d848dd7b95717f400098c">PIN_SafeCopyEx</a> (VOID *dst, const VOID *src, size_t size, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo)</td></tr>
<tr class="separator:ga9ca9a29ec02d848dd7b95717f400098c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ff2e9b5b14feb3dc3102c9a34d24ff7"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga7ff2e9b5b14feb3dc3102c9a34d24ff7">PIN_IsActionPending</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid)</td></tr>
<tr class="separator:ga7ff2e9b5b14feb3dc3102c9a34d24ff7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34b3940069a6c996249af9681348b31e"><td class="memItemLeft" align="right" valign="top">UINT32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga34b3940069a6c996249af9681348b31e">PIN_GetInitialThreadCount</a> ()</td></tr>
<tr class="separator:ga34b3940069a6c996249af9681348b31e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81eca939c7f3a6e3b83d06738ea2f67f"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga81eca939c7f3a6e3b83d06738ea2f67f">PIN_CheckReadAccess</a> (VOID *addr)</td></tr>
<tr class="separator:ga81eca939c7f3a6e3b83d06738ea2f67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga038d6b330dc2b8d3e1efe8e3bfd6ff88"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga038d6b330dc2b8d3e1efe8e3bfd6ff88">PIN_CheckWriteAccess</a> (VOID *addr)</td></tr>
<tr class="separator:ga038d6b330dc2b8d3e1efe8e3bfd6ff88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6039144b83fc21c5482e16522e700c91"><td class="memItemLeft" align="right" valign="top">ADDRINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga6039144b83fc21c5482e16522e700c91">PIN_GetAuxVectorValue</a> (ADDRINT type, bool *found)</td></tr>
<tr class="separator:ga6039144b83fc21c5482e16522e700c91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a74f4530db5d94bede1391c59e39939"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols</a> ()</td></tr>
<tr class="separator:ga5a74f4530db5d94bede1391c59e39939"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadeaa38396564e0afbd701fce28131937"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#gadeaa38396564e0afbd701fce28131937">PIN_InitSymbolsAlt</a> (<a class="el" href="group__PIN__CONTROL.html#ga32ad8725a818ddded04963a3b35a317c">SYMBOL_INFO_MODE</a> mode)</td></tr>
<tr class="separator:gadeaa38396564e0afbd701fce28131937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d13104ec745914b6479aa4aa105797c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__CONTROL.html#ga9d13104ec745914b6479aa4aa105797c">PIN_AddForkFunctionProbed</a> (<a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a> point, <a class="el" href="group__PIN__CONTROL.html#gab142a18b094055ca96bce4493a70c9ef">FORK_PROBE_MODE_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga9d13104ec745914b6479aa4aa105797c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This group of functions is used to initialize Pin, start the application, and a call backs for events like application exit. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gae749c259c2759db886e1afbbffb8c11a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae749c259c2759db886e1afbbffb8c11a">&#9670;&nbsp;</a></span>APPLICATION_START_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* APPLICATION_START_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when pin initialization is finished.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga06536b5ceeac39f951acd0541f33d6e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga06536b5ceeac39f951acd0541f33d6e0">&#9670;&nbsp;</a></span>ATTACH_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* ATTACH_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when Pin attaches to application in JIT mode</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab167aa6770e560c4cae763d950104e18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab167aa6770e560c4cae763d950104e18">&#9670;&nbsp;</a></span>ATTACH_PROBED_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* ATTACH_PROBED_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when Pin attaches to application in Probe mode</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf00c74890a27774b6f9dad0f8267b720"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf00c74890a27774b6f9dad0f8267b720">&#9670;&nbsp;</a></span>CONTEXT_CHANGE_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* CONTEXT_CHANGE_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="group__PIN__CONTROL.html#ga8e4e6511a0e09fdc5ec7d6dbf395b3a8">CONTEXT_CHANGE_REASON</a> reason, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *from, <a class="el" href="structCONTEXT.html">CONTEXT</a> *to, INT32 info, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when application changes context.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the thread that changes contexts. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reason</td><td>Cause of the context change. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>Application's register state prior to the context change (NULL if <em>reason</em> is CONTEXT_CHANGE_REASON_CALLBACK). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">to</td><td>Application's register state after context change (NULL if <em>reason</em> is CONTEXT_CHANGE_REASON_FATALSIGNAL). The tool may change this and affect the new register state. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>Additional information (depends on <em>reason</em>): <ul>
<li>CONTEXT_CHANGE_REASON_FATALSIGNAL: The Unix signal number. </li>
<li>CONTEXT_CHANGE_REASON_SIGNAL: The Unix signal number. </li>
<li>CONTEXT_CHANGE_REASON_EXCEPTION: The Windows exception code. </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3">&#9670;&nbsp;</a></span>DETACH_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* DETACH_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when Pin detaches from application in JIT mode</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga2d1917077e6365cb55f94a8cd1747b7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2d1917077e6365cb55f94a8cd1747b7f">&#9670;&nbsp;</a></span>DETACH_PROBED_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* DETACH_PROBED_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when Pin detaches from application in Probe mode</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaab6073f3d7826fab0acd80622e7daf4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab6073f3d7826fab0acd80622e7daf4a">&#9670;&nbsp;</a></span>FETCH_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef size_t(* FETCH_CALLBACK) (void *buf, ADDRINT addr, size_t size, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function that Pin will use to fetch code bytes to be jitted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>A buffer which receives the fetched instruction bytes. This buffer is at least <em>size</em> bytes long. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>Starting address from which instruction bytes should be fetched. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The number of bytes that should be fetched. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pExceptInfo</td><td>If less than <em>size</em> bytes are fetched, <em>pExceptInfo</em> receives an exception that describes why more bytes could not be fetched. If Pin needs more bytes to decode the next instruction, this exception will be delivered to the application. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes sucessfully fetched into <em>buf</em>. This may be less than <em>size</em> (or even zero) if Pin attempts to fetch instructions from an invalid address. </dd></dl>

</div>
</div>
<a id="ga8978f19f9ba6f66dcb9ab0763a32927c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8978f19f9ba6f66dcb9ab0763a32927c">&#9670;&nbsp;</a></span>FINI_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* FINI_CALLBACK) (INT32 code, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when application exits. It is called after all the per thread fini functions were called (registered via <a class="el" href="group__PIN__CONTROL.html#gad4d7046de9ac2cc919910ca3293d2db6">PIN_AddThreadFiniFunction</a>). This function may be called on any application thread or internal thread spawned by the tool.</p>
<p>@Note It is prohibited to access the TLS in this callback.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>O/S specific termination code for the application. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga37b2fde2c0e113f45b69347032225840"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37b2fde2c0e113f45b69347032225840">&#9670;&nbsp;</a></span>FORK_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* FORK_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadid, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when the application forks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadId</td><td>Thread index </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Register state immediately before/after the fork. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab142a18b094055ca96bce4493a70c9ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab142a18b094055ca96bce4493a70c9ef">&#9670;&nbsp;</a></span>FORK_PROBE_MODE_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* FORK_PROBE_MODE_CALLBACK) (UINT32 childPid, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unix-specific instrumentation in probe mode</p>
<p>Call-back function in probe mode for fork notification.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">childPid</td><td>Process id of the child process, available after fork in parent </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae2eccf99d56cf9ac54001dc2f1c7a559"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2eccf99d56cf9ac54001dc2f1c7a559">&#9670;&nbsp;</a></span>INTERCEPT_SIGNAL_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* INTERCEPT_SIGNAL_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, INT32 sig, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, BOOL hasHandler, const <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when the tool intercepts a signal with <a class="el" href="group__PIN__CONTROL.html#ga3463df5a1390b87e8a4568d6f2f43df9">PIN_InterceptSignal()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The Pin thread ID of the thread that handled the signal. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sig</td><td>The signal number. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ctxt</td><td>The application's register state when it was interrupted by the signal. The tool may change this context if desired. If so, the application continues at the modified context. Or, if the application's signal handler is invoked, the handler is passed the modified context for its return context. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hasHandler</td><td>TRUE if the application has a handler registered for this signal. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pExceptInfo</td><td>If the signal represents an exception, <em>pExceptInfo</em> points to a description of the exception. If the signal is not an exception, <em>pExceptInfo</em> is NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returning TRUE tells Pin to pass the signal on to the application. Returning FALSE tells Pin to squash the signal and execution resumes at <em>ctxt</em>. </dd></dl>

</div>
</div>
<a id="ga48e4c80589225d40efe177a9d399225c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga48e4c80589225d40efe177a9d399225c">&#9670;&nbsp;</a></span>INTERNAL_EXCEPTION_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group__PIN__CONTROL.html#ga8c5c16fb133375efa3a27d3a3900c603">EXCEPT_HANDLING_RESULT</a>(* INTERNAL_EXCEPTION_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *pExceptInfo, <a class="el" href="structPHYSICAL__CONTEXT.html">PHYSICAL_CONTEXT</a> *pPhysCtxt, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pin client interface and implementation for internal exception handling</p>
<p>Handler (call-back) function when pin/tool generates internal exception. This function can be registered via <a class="el" href="group__PIN__CONTROL.html#ga497983e81c1cfaf15866667e31eee791">PIN_AddInternalExceptionHandler()</a> or <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a>. This function becomes active only after APPLICATION_START_CALLBACK notification is delivered. Any internal exception prior to this event can't be handled.</p>
<p>If the exception occurred while analysis routine is executed, it is legal to modify the execution control path using functions such as <a class="el" href="group__EXCEPTION.html#ga35d13dc3ce578945eda8228b0db1c138">PIN_RaiseException()</a> or <a class="el" href="group__CONTEXT.html#gade2217c59d6e6b5cad08a59afe3d879a">PIN_ExecuteAt()</a>. In this case, any per-thread INTERNAL_EXCEPTION_CALLBACK function registered via <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a> will be unregistered automatically (similar semantics to <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a> for all registered notifications)</p>
<dl class="section note"><dt>Note</dt><dd>It is unsupported to call <a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction()</a> in the scope of this callback</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The Pin thread ID of the thread that generated the exception. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pExceptInfo</td><td>Pointer to the <a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> structure that describes the exception. If the exception should be raised in the context of the application (using <a class="el" href="group__EXCEPTION.html#ga35d13dc3ce578945eda8228b0db1c138">PIN_RaiseException()</a>), The tool should update the exception info to match the OS logic (e.g. update exception address using <a class="el" href="group__EXCEPTION.html#ga397741c75f32043c9fcf6525f668678a">PIN_SetExceptionAddress()</a>). </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pPhysCtxt</td><td>Physical register state when the exception was generated. The tool can change <em>pPhysCtxt</em> (make sure that if <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a> was called, matching <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a> will be called) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an <em>EXCEPT_HANDLING_RESULT</em> value </dd></dl>

</div>
</div>
<a id="ga3a5f26e35e32bc5e99d101995339bd73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3a5f26e35e32bc5e99d101995339bd73">&#9670;&nbsp;</a></span>MEMORY_ADDR_TRANS_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef ADDRINT(<a class="el" href="group__INST__ARGS.html#ga5d3025eb005b7ea4745799f0ee1b86a6">PIN_FAST_ANALYSIS_CALL</a>* MEMORY_ADDR_TRANS_CALLBACK) (<a class="el" href="structPIN__MEM__TRANS__INFO.html">PIN_MEM_TRANS_INFO</a> *memTransInfo, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function for pin/tool to modify memory address arguments in analysis routines. This feature allows users to register for a callback immediately prior to an analysis routine which gets one of the four IARG_MEMORY*_PTR as a parameter. The callback enables the user to manipulate the memory address pointed to by the aforementioned parameter. This function can be registered via <a class="el" href="group__PIN__CONTROL.html#ga6ddee86f9c82dd00f07123dfc21a58ed">PIN_AddMemoryAddressTransFunction()</a>. This function is called from the jitted code, so calls to this function are not serialized.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">memTransInfo</td><td>Memory address data structure </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafdfc14fff9d077c1c56019a71763d30f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafdfc14fff9d077c1c56019a71763d30f">&#9670;&nbsp;</a></span>OUT_OF_MEMORY_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* OUT_OF_MEMORY_CALLBACK) (size_t size, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when pin/tool is out of memory. This function can be registered via <a class="el" href="group__PIN__CONTROL.html#ga77187fb76889090655ab0881ee096911">PIN_AddOutOfMemoryFunction()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the failed allocation </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga943bbe3eeb81be27f127382e4b3f82bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga943bbe3eeb81be27f127382e4b3f82bb">&#9670;&nbsp;</a></span>PIN_CONFIGURATION_INFO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID* <a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Global configuration for Pin. Currently, this configuration includes whether Pin should serialize calls to some callbacks (for backward compatibility) or if it should concurrently call the callbacks (better for multi-threaded performance).</p>
<p>See also: <a class="el" href="group__PIN__CONTROL.html#gaaf30fb0e2832f9ce1016b9c751547d17">PIN_SetAllowedConcurrentCallbacks()</a></p>
<dl class="section note"><dt>Note</dt><dd>A new instance of PIN_CONFIGURATION_INFO with default values should be created with <a class="el" href="group__PIN__CONTROL.html#ga614df849c7bcb0f5ad0c01f98b39dad3">PIN_CreateDefaultConfigurationInfo()</a> </dd></dl>

</div>
</div>
<a id="ga47618aec52f2e6918ca0ffce8fefabde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga47618aec52f2e6918ca0ffce8fefabde">&#9670;&nbsp;</a></span>PREPARE_FOR_FINI_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* PREPARE_FOR_FINI_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function invoked when Pin is about to detach from terminating process. The function that is registered by this callback may gracefully finish all the internal threads of the tool, e.g.</p><ul>
<li>Force all the internal threads of the tool to finish using return from the main function of the thread or calling PIN_ExitThread.</li>
<li>Wait until all the internal threads are finished before it will continue to run. @Note: normal run of the internal threads after exit from all registered call back functions of this type is not guaranteed. @Note: If current thread is an internal thread, do not finish it in this callback!</li>
</ul>
<p>This function is invoked in thread that initiated process termination. This function is registered via <a class="el" href="group__PIN__CONTROL.html#gacd670ecd04074a3962968de22aab247c">PIN_AddPrepareForFiniFunction()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabd9a69f9525e3ff6b422dabd230cf63c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd9a69f9525e3ff6b422dabd230cf63c">&#9670;&nbsp;</a></span>REMOVE_INSTRUMENTATION_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* REMOVE_INSTRUMENTATION_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function when Pin removes all old instrumented code from its cache</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafe174c8e7f51d02d96b572a3253ba2e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe174c8e7f51d02d96b572a3253ba2e4">&#9670;&nbsp;</a></span>THREAD_ATTACH_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_ATTACH_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when an attached thread starts to run under Pin in JIT mode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the terminating thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Register state of the thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad66d9075769a0573e43721a1fb0c3e5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad66d9075769a0573e43721a1fb0c3e5e">&#9670;&nbsp;</a></span>THREAD_ATTACH_PROBED_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_ATTACH_PROBED_CALLBACK) (VOID *sigmask, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when an attached thread starts to run under Pin in probe mode. The tool receives the signal mask at the attach point and can modify it. The changes to this value will be applied when the thread continues to run. Pin does not validate the new signal mask so tools must take extra care when modifying this value.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">sigmask</td><td>The thread's signal mask at the attach point. The tool may change this and affect the signal mask once the thread starts running again. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga5c72b4a2e0ec256e8811ad82bfb3c71c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5c72b4a2e0ec256e8811ad82bfb3c71c">&#9670;&nbsp;</a></span>THREAD_DETACH_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_DETACH_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function before an application thread is detached from Pin in JIT mode. The callback is received in the thread native context before Pin detach.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the terminating thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Register state of the thread immediately before it detaches. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac799b787468a308c8fe33345a74403b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac799b787468a308c8fe33345a74403b3">&#9670;&nbsp;</a></span>THREAD_DETACH_PROBED_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_DETACH_PROBED_CALLBACK) (VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function before an application thread is being detached from Pin in probe mode. The callback is received in the thread native context before probes removal.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga99a915108f24a372d07d45560db7fa87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99a915108f24a372d07d45560db7fa87">&#9670;&nbsp;</a></span>THREAD_FINI_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_FINI_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, INT32 code, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when thread ends.</p>
<p>@Note This function may be called on a different thread than the given threadIndex.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the terminating thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Register state of the thread immediately before it terminates. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>O/S specific termination code for the thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga848885f455ca7e4000cbe34359851a53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga848885f455ca7e4000cbe34359851a53">&#9670;&nbsp;</a></span>THREAD_START_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* THREAD_START_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, INT32 flags, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when thread begins.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the new thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Initial register state for the new thread. The tool may change this. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>O/S specific flags for the new thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga04847a38918bb66387b616e2dac6e291"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga04847a38918bb66387b616e2dac6e291">&#9670;&nbsp;</a></span>ATTACH_STATUS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return values of <a class="el" href="group__PIN__CONTROL.html#gac0f5ea28f49b4cd28101140f021c7f71">PIN_Attach()</a> and <a class="el" href="group__PIN__CONTROL.html#gababd11163709312e34584227d6a3994a">PIN_AttachProbed()</a> which describe the status of the attach request. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga04847a38918bb66387b616e2dac6e291a37b8fca2f05c816ab237c1cdb72adb0c"></a>ATTACH_INITIATED&#160;</td><td class="fielddoc"><p>Attach request was delivered successfully to PIN. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga04847a38918bb66387b616e2dac6e291af2ccbdc4611e742b0fdc7de09455b8b9"></a>ATTACH_FAILED_DETACH&#160;</td><td class="fielddoc"><p>Attach request was not delivered to Pin since detach session hasn't completed yet. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga8e4e6511a0e09fdc5ec7d6dbf395b3a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8e4e6511a0e09fdc5ec7d6dbf395b3a8">&#9670;&nbsp;</a></span>CONTEXT_CHANGE_REASON</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga8e4e6511a0e09fdc5ec7d6dbf395b3a8">CONTEXT_CHANGE_REASON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Possible reasons for an application context change. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8ae712c798df1d0e94022f6382a4c8239e"></a>CONTEXT_CHANGE_REASON_FATALSIGNAL&#160;</td><td class="fielddoc"><p>Receipt of fatal Unix signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a43b8b032e969e0e5d14a3ed7385f29db"></a>CONTEXT_CHANGE_REASON_SIGNAL&#160;</td><td class="fielddoc"><p>Receipt of handled Unix signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a7e8b6943c9aa3a85b0a9cd23bc738dd9"></a>CONTEXT_CHANGE_REASON_SIGRETURN&#160;</td><td class="fielddoc"><p>Return from Unix signal handler. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a641c250ce491d66cc19f1205160dc279"></a>CONTEXT_CHANGE_REASON_APC&#160;</td><td class="fielddoc"><p>Receipt of Windows APC. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8ae4c034a98f8eba91b2f8ac5b2543492b"></a>CONTEXT_CHANGE_REASON_EXCEPTION&#160;</td><td class="fielddoc"><p>Receipt of Windows exception. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8e4e6511a0e09fdc5ec7d6dbf395b3a8a5b48097c22e4fcfdf12650129f364b50"></a>CONTEXT_CHANGE_REASON_CALLBACK&#160;</td><td class="fielddoc"><p>Receipt of Windows call-back. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga8c5c16fb133375efa3a27d3a3900c603"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8c5c16fb133375efa3a27d3a3900c603">&#9670;&nbsp;</a></span>EXCEPT_HANDLING_RESULT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga8c5c16fb133375efa3a27d3a3900c603">EXCEPT_HANDLING_RESULT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Possible return values of the <a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a> exception filter function </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga8c5c16fb133375efa3a27d3a3900c603a32e365f541f4ea48f730a030185558cd"></a>EHR_HANDLED&#160;</td><td class="fielddoc"><p>Exception is handled. Continue execution with the internal physical context. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8c5c16fb133375efa3a27d3a3900c603ab394692e0b4ad2fda77e7597c75c9599"></a>EHR_UNHANDLED&#160;</td><td class="fielddoc"><p>Exception is not handled. Execute default system procedure for unhandled exceptions (Windows) or abort the process (Unix) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga8c5c16fb133375efa3a27d3a3900c603a1950501612b017bd8db1634f7dc8bf8f"></a>EHR_CONTINUE_SEARCH&#160;</td><td class="fielddoc"><p>Execute next (upper level) exception filter function, if any. For the uppermost filter, this is the same as EHR_UNHANDLED semantics </p>
</td></tr>
</table>

</div>
</div>
<a id="ga2114b4480d050e1b7c8ac63449610448"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2114b4480d050e1b7c8ac63449610448">&#9670;&nbsp;</a></span>FPOINT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>time of callback notification </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga2114b4480d050e1b7c8ac63449610448ae15497466a8ecc6bddc4becc933efa12"></a>FPOINT_BEFORE&#160;</td><td class="fielddoc"><p>Call-back in parent, just before fork. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2114b4480d050e1b7c8ac63449610448a76673c60a3c5d0f8beebffc3679552b3"></a>FPOINT_AFTER_IN_PARENT&#160;</td><td class="fielddoc"><p>Call-back in parent, immediately after fork. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2114b4480d050e1b7c8ac63449610448a545c2194fff97c1159b8872ba4632a2b"></a>FPOINT_AFTER_IN_CHILD&#160;</td><td class="fielddoc"><p>Call-back in child, immediately after fork. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga4e114852e46d5d839d6e71e242709777"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4e114852e46d5d839d6e71e242709777">&#9670;&nbsp;</a></span>PIN_CALLBACK_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga4e114852e46d5d839d6e71e242709777">PIN_CALLBACK_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Types of Pin callbacks. These type could be used with the function <a class="el" href="group__PIN__CONTROL.html#gaaf30fb0e2832f9ce1016b9c751547d17">PIN_SetAllowedConcurrentCallbacks()</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga4e114852e46d5d839d6e71e242709777af6f04d87615566deb3bd49ec1e3468ef"></a>PIN_CALLBACK_TYPE_NONE&#160;</td><td class="fielddoc"><p>None of the callback types. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga4e114852e46d5d839d6e71e242709777ae9e0416b9e54e38bc1cf69956f81bc2c"></a>PIN_CALLBACK_TYPE_SYSCALL&#160;</td><td class="fielddoc"><p>Syscall entry/exit callback. </p>
</td></tr>
</table>

</div>
</div>
<a id="gab28152f755e5215a5e9ef343054e152e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab28152f755e5215a5e9ef343054e152e">&#9670;&nbsp;</a></span>REPLAY_MODE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#gab28152f755e5215a5e9ef343054e152e">REPLAY_MODE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Flags passed to PIN_SetReplayMode. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggab28152f755e5215a5e9ef343054e152eac9edf1a9d0e893b11600c3667543994e"></a>REPLAY_MODE_IMAGEOPS&#160;</td><td class="fielddoc"><p>Replayer will handle image ops. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga1079583ef7d0d89098794aaafc2cdd7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1079583ef7d0d89098794aaafc2cdd7f">&#9670;&nbsp;</a></span>SMC_ENABLE_DISABLE_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga1079583ef7d0d89098794aaafc2cdd7f">SMC_ENABLE_DISABLE_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enum for controlling Pin's SMC detection </p>

</div>
</div>
<a id="ga32ad8725a818ddded04963a3b35a317c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga32ad8725a818ddded04963a3b35a317c">&#9670;&nbsp;</a></span>SYMBOL_INFO_MODE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PIN__CONTROL.html#ga32ad8725a818ddded04963a3b35a317c">SYMBOL_INFO_MODE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>List of supported modes of symbolic information delivery. Used in <a class="el" href="group__PIN__CONTROL.html#gadeaa38396564e0afbd701fce28131937">PIN_InitSymbolsAlt()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga32ad8725a818ddded04963a3b35a317ca638dc98de833dc4037e14bc6b0e2293d"></a>NO_SYMBOLS&#160;</td><td class="fielddoc"><p>No symbols required. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga32ad8725a818ddded04963a3b35a317ca7deba6e46686ecdd822e1481e3fa32ef"></a>EXPORT_SYMBOLS&#160;</td><td class="fielddoc"><p>Only symbols taken from export table are provided (Windows only) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga32ad8725a818ddded04963a3b35a317ca69ec95d319e1326991d9a661c7b5a349"></a>DEBUG_SYMBOLS&#160;</td><td class="fielddoc"><p>Debug symbols (Windows only, currently implemented as DEBUG_OR_EXPORT_SYMBOLS) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga32ad8725a818ddded04963a3b35a317ca1c55b53fa60ae1040208433b28c4f833"></a>IFUNC_SYMBOLS&#160;</td><td class="fielddoc"><p>IFUNC symbols (Linux only) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga32ad8725a818ddded04963a3b35a317ca377cc21f8510135927d79a96d656a726"></a>DEBUG_OR_EXPORT_SYMBOLS&#160;</td><td class="fielddoc"><p>First debug symbols if available, otherwise export symbols (Windows only) </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga785776d108a7843f983698509eceefc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga785776d108a7843f983698509eceefc9">&#9670;&nbsp;</a></span>PIN_AddApplicationStartFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddApplicationStartFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gae749c259c2759db886e1afbbffb8c11a">APPLICATION_START_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called after pin initialization is finished. This notification function is available when pin launches the application and when pin attaches to a running process.</p>
<p>On Unix (Linux &amp; macOS*): This notification function is called on the application's main thread (both launch &amp; attach mode). This notification is called right before Pin resume the application.</p>
<p>On Windows: When pin launches the application, this notification function is called on the application's main thread. When pin attaches to a running process, this notification function is called on a dedicated thread which is not part of the application's threads.<br  />
 When it is called, all the application's threads are paused by Pin and are about to be released.<br  />
 No new threads can be created by the application at this time.</p>
<p>When Pin starts running a program, it calls into the tool several times in the following order:<br  />
</p><ol type="1">
<li>Calls the tool's main() function.<br  />
</li>
<li>If the tool set up a notification with <a class="el" href="group__IMG.html#ga4a067152140ead3e23279ab2bd6cd723">IMG_AddInstrumentFunction()</a>, Pin calls this call-back for each image that is already loaded in the application's address space at the point when Pin attaches to it.<br  />
</li>
<li>Calls any notification call-backs set up with <a class="el" href="group__PIN__CONTROL.html#ga785776d108a7843f983698509eceefc9">PIN_AddApplicationStartFunction()</a>.<br  />
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Function to be called at application start. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows, Linux, macOS*<br  />
<b>CPU:</b> IA-32, Intel(R) 64<br  />
</dd></dl>
</li>
</ol>

</div>
</div>
<a id="ga1cc0f28140cb83a035ebabdddf81861f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1cc0f28140cb83a035ebabdddf81861f">&#9670;&nbsp;</a></span>PIN_AddContextChangeFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddContextChangeFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gaf00c74890a27774b6f9dad0f8267b720">CONTEXT_CHANGE_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called immediately before the application changes context due to receipt of an asynchronous event such as Unix signal or Windows APC.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute immediately before the application changes context. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga7501b4226bc92f358b7b361eea0929d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7501b4226bc92f358b7b361eea0929d2">&#9670;&nbsp;</a></span>PIN_AddDetachFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddDetachFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga001c6e9e0cac2ab4ea3ae3d9f5a15fc3">DETACH_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call func immediately before Pin relinquishes control of the application through <a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach()</a>.</p>
<p>At this stage no more instrumentation/analysis callbacks will be called</p>
<p>This function is called one time for the process. It may be called by any thread. Pin memory is not freed at this moment.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function to execute before detaching </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga4710100bcce91bdc5fc67bf8f918123a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4710100bcce91bdc5fc67bf8f918123a">&#9670;&nbsp;</a></span>PIN_AddDetachFunctionProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddDetachFunctionProbed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga2d1917077e6365cb55f94a8cd1747b7f">DETACH_PROBED_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called immediately after Pin relinquishes control of the application through <a class="el" href="group__PIN__CONTROL.html#gaf2fdaea6bac0c3a75e73d2692fd16b8e">PIN_DetachProbed()</a>. There can be more than one Detach callback function.<br  />
 When this callback function is called, it is guaranteed that Pin removed all probes from the application code and that no other callback function will be called afterwards (except from additional Detach callback functions).<br  />
 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function to execute before detaching </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga22abc469fb3a124bf69f80111f6fdef7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga22abc469fb3a124bf69f80111f6fdef7">&#9670;&nbsp;</a></span>PIN_AddFetchFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_AddFetchFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gaab6073f3d7826fab0acd80622e7daf4a">FETCH_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called to register a function That will become the function that Pin calls to fetch application instructions. Pin sometimes attempt to fetch instructions from an invalid address, and the call-back needs to handle this correctly. If multiple functions are registered using this API, only the last one registered is used</p>
<p>Pin cannot automatically detect self-modifying code (SMC) when a tool uses this API. Therefore, such tools take over responsibility for detecting SMC and must explicitly regenerate all traces within a modified code range if such was detected using PIN_RemoveInstrumentationInRange.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The tool's call-back function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaa78c7b560975a6feffa420fadedc0627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa78c7b560975a6feffa420fadedc0627">&#9670;&nbsp;</a></span>PIN_AddFiniFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddFiniFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga8978f19f9ba6f66dcb9ab0763a32927c">FINI_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call func immediately before the application exits. The function is not an instrumentation function&ndash;it cannot insert instrumentation. There can be more than one Fini function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function is passed exit code and val </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gae710eef7b08de1d153a0b7f3469175a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae710eef7b08de1d153a0b7f3469175a0">&#9670;&nbsp;</a></span>PIN_AddFollowChildProcessFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddFollowChildProcessFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__PROCESS.html#gabccd10f8f7203db2476f28a5c3a8f75b">FOLLOW_CHILD_PROCESS_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called before a child/exec-ed process is starting to execute</p>
<p>NOTE: Only one callback can be registered</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows, Linux, macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gad29e508159c002cafcb389624595ffba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad29e508159c002cafcb389624595ffba">&#9670;&nbsp;</a></span>PIN_AddForkFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddForkFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a>&#160;</td>
          <td class="paramname"><em>point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga37b2fde2c0e113f45b69347032225840">FORK_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification handler that is called when the application forks a new process.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">where</td><td>Tells when to make the call-back and tells whether the parent or child makes the call-back. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Value passed as final parameter to call-back.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<p>If the fork function fails, the FPOINT_AFTER_IN_PARENT function, if it exists, is still called.</p>
<dl class="section note"><dt>Note</dt><dd>The pin client is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga9d13104ec745914b6479aa4aa105797c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d13104ec745914b6479aa4aa105797c">&#9670;&nbsp;</a></span>PIN_AddForkFunctionProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddForkFunctionProbed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga2114b4480d050e1b7c8ac63449610448">FPOINT</a>&#160;</td>
          <td class="paramname"><em>point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gab142a18b094055ca96bce4493a70c9ef">FORK_PROBE_MODE_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification handler that is called when the application forks a new process. If vfork() is called in application, Pin replaces it with fork(). This replacement is needed to keep Pin/Tool state consistent and prevent memory overlap in callbacks following the fork/vfork. The function can only be used on Linux, and macOS*.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">where</td><td>Tells when to make the call-back and tells whether the parent or child makes the call-back. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Value passed as final parameter to call-back.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<p>If the fork function fails, the FPOINT_AFTER_IN_PARENT function, if it exists, is still called.</p>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Linux, and macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga497983e81c1cfaf15866667e31eee791"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga497983e81c1cfaf15866667e31eee791">&#9670;&nbsp;</a></span>PIN_AddInternalExceptionHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddInternalExceptionHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a global (not per-thread) notification handler function that is called upon receipt of any unhandled internal exception in Pin or the tool. This handler does not catch exceptions that are generated by the application, nor does it catch exceptions that are handled by <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a> / <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a>. The handler is active for all the application's threads, it should be called in tool's main() before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>. If it is called after <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a> is called, it will be ignored. The user can register up to MAX_IEH_CALLBACKS global notification functions.</p>
<dl class="section note"><dt>Note</dt><dd>This function should be used for permanent global call-back registration (as opposed to <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a> / <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a> pair which should be used for function scope registration).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Handler function to execute upon receipt of internal exception in pin/tool. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga6ddee86f9c82dd00f07123dfc21a58ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6ddee86f9c82dd00f07123dfc21a58ed">&#9670;&nbsp;</a></span>PIN_AddMemoryAddressTransFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_AddMemoryAddressTransFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a callback for modifying memory address arguments that are passed to analysis routines. See <a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a> for usage details. <br  />
 Only one such callback may be registered. <br  />
 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function is passed the thread id, address, size, read\write </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT <br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga77187fb76889090655ab0881ee096911"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga77187fb76889090655ab0881ee096911">&#9670;&nbsp;</a></span>PIN_AddOutOfMemoryFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_AddOutOfMemoryFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gafdfc14fff9d077c1c56019a71763d30f">OUT_OF_MEMORY_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called when pin/tool is out of memory.<br  />
 Try to reduce memory consumption when this notification function is called.<br  />
 Any implicit or explicit usage of malloc()/realloc() etc. in this notification function might cause an infinite recursion.<br  />
The call to the notification function is NOT serialized by pin. The user can't assume anything about the locks state while the notification is delivered (as out of memory condition can occur anywhere). Avoid dead-locks by careful design of the notification function.<br  />
 A tool can register only one notification function.<br  />
A new notification function registration overwrites any previous registration.<br  />
To disable the notification function, pass a NULL function pointer.<br  />
 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function is passed the size of the failing allocation </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; PROBE<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gacd670ecd04074a3962968de22aab247c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacd670ecd04074a3962968de22aab247c">&#9670;&nbsp;</a></span>PIN_AddPrepareForFiniFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddPrepareForFiniFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga47618aec52f2e6918ca0ffce8fefabde">PREPARE_FOR_FINI_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a function to be called when the application is about to exit. The registered function will be executed in a thread that initiated the exit and currently does not hold any thread synchronization lock in Pin. It means that this callback function can be executed concurrently with other Pin callbacks and APIs.<br  />
All callbacks registered by this function will be executed before any callback registered by the <a class="el" href="group__PIN__CONTROL.html#gaa78c7b560975a6feffa420fadedc0627">PIN_AddFiniFunction()</a> function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Callback function to be registered </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Function registered by this API after application exit is started, may not be executed.</dd>
<dd>
The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaf4f2f9e67165b011a3eadedc97fa3d67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf4f2f9e67165b011a3eadedc97fa3d67">&#9670;&nbsp;</a></span>PIN_AddThreadAttachFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadAttachFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gafe174c8e7f51d02d96b572a3253ba2e4">THREAD_ATTACH_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is useful when Pin is run in JIT mode and attaches to a running process. Tools may use this API to register a notification that is called by each application thread.</p>
<p>After Pin attaches to the process, Pin first notifies the tool of any images that are loaded (see <a class="el" href="group__IMG.html#ga4a067152140ead3e23279ab2bd6cd723">IMG_AddInstrumentFunction()</a>) and then notifies the tool that initialization is complete (see <a class="el" href="group__PIN__CONTROL.html#ga785776d108a7843f983698509eceefc9">PIN_AddApplicationStartFunction()</a>). After that, each thread in the application calls the notification set up by <a class="el" href="group__PIN__CONTROL.html#gaf4f2f9e67165b011a3eadedc97fa3d67">PIN_AddThreadAttachFunction()</a>. After each thread returns from this notification, it resumes execution in the application code.</p>
<p>Note, this notification happens only for threads that exist in the process at the time that Pin attaches.</p>
<p>It does not happen for the following threads:</p><ol type="1">
<li>Threads that are created in the process after Pin is already attached.</li>
<li>Internal threads spawned by Pin tool when Pin re-attaches to the application.</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute for the attached thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga00eaa74b7c902c85fa80ca9f7983c896"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga00eaa74b7c902c85fa80ca9f7983c896">&#9670;&nbsp;</a></span>PIN_AddThreadAttachProbedFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadAttachProbedFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gad66d9075769a0573e43721a1fb0c3e5e">THREAD_ATTACH_PROBED_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is useful when Pin is run in probe mode and attaches to a running process. Tools may use this API to register a notification that is called by each application thread.</p>
<p>After Pin attaches to the process, Pin first notifies the tool of any images that are loaded (see <a class="el" href="group__IMG.html#ga4a067152140ead3e23279ab2bd6cd723">IMG_AddInstrumentFunction()</a>) and then notifies the tool that initialization is complete (see <a class="el" href="group__PIN__CONTROL.html#ga785776d108a7843f983698509eceefc9">PIN_AddApplicationStartFunction()</a>). After that, each thread in the application calls the notification set up by <a class="el" href="group__PIN__CONTROL.html#ga00eaa74b7c902c85fa80ca9f7983c896">PIN_AddThreadAttachProbedFunction()</a>. After each thread returns from this notification, it resumes execution in the application code.</p>
<p>Note, this notification happens only for threads that exist in the process at the time that Pin attaches. It does not happen for threads that are created in the process after Pin is already attached.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute for the attached thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaa44e9c96f499d7ed333d7aa0b9518f3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa44e9c96f499d7ed333d7aa0b9518f3b">&#9670;&nbsp;</a></span>PIN_AddThreadDetachFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadDetachFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga5c72b4a2e0ec256e8811ad82bfb3c71c">THREAD_DETACH_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is useful when Pin runs in JIT mode and detaches from a running process. Tools may use this API to register a notification that is called by each application thread before Pin detaches from the thread. This notification is given in the thread native context.</p>
<p>Note, this notification happens only for application threads that exist in the process at the time that Pin detaches. It does not happen for the following threads:</p><ol type="1">
<li>Threads that are created in the process after Pin is already detached.</li>
<li>Internal threads spawned by Pin tool.</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute by the detaching thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga31c0ce7e402dbbd3c5fc4b926a5ef391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga31c0ce7e402dbbd3c5fc4b926a5ef391">&#9670;&nbsp;</a></span>PIN_AddThreadDetachProbedFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadDetachProbedFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gac799b787468a308c8fe33345a74403b3">THREAD_DETACH_PROBED_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is useful when Pin runs in probe mode and detaches from a running process. Tools may use this API to register a notification that is called by each application thread before any probes removal. This notification is given in the thread native context.</p>
<p>Note, this notification happens only for threads that exist in the process at the time that Pin detaches. It does not happen for threads that are created in the process after Pin is already detached.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute by the detaching thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gad4d7046de9ac2cc919910ca3293d2db6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad4d7046de9ac2cc919910ca3293d2db6">&#9670;&nbsp;</a></span>PIN_AddThreadFiniFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadFiniFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga99a915108f24a372d07d45560db7fa87">THREAD_FINI_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called when an application thread terminates. The call-back happens even for the application's root (initial) thread.</p>
<p>The notification call-back will often happen on the physical thread that is exiting, but under some circumstances it will be called on a different physical thread.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute for the terminating thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga984b4424d9ebf819ad6045894adbce38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga984b4424d9ebf819ad6045894adbce38">&#9670;&nbsp;</a></span>PIN_AddThreadStartFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddThreadStartFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga848885f455ca7e4000cbe34359851a53">THREAD_START_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a notification function that is called when a thread starts executing in the application. The call-back happens even for the application's root (initial) thread.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Call-back function to execute for the new thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gac0f5ea28f49b4cd28101140f021c7f71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac0f5ea28f49b4cd28101140f021c7f71">&#9670;&nbsp;</a></span>PIN_Attach()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a> PIN_Attach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga06536b5ceeac39f951acd0541f33d6e0">ATTACH_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initiate Pin attach request in JIT mode. If Pin was not detached (using <a class="el" href="group__PIN__CONTROL.html#gaf2fdaea6bac0c3a75e73d2692fd16b8e">PIN_DetachProbed()</a>) this function will be ignored.<br  />
The given notification function will be called immediately after Pin regains control of the application. It is expected that in the scope of this callback, the tool will register callbacks (e.g. <a class="el" href="group__IMG.html#ga4a067152140ead3e23279ab2bd6cd723">IMG_AddInstrumentFunction()</a>) and will reconfigure itself (if needed). In order to change tool's <a class="el" href="classKNOB.html">KNOB</a> value, use <a class="el" href="group__KNOBS.html">KNOB: Commandline Option Handling</a></p>
<dl class="section note"><dt>Note</dt><dd>Pin's state can't be reconfigured in the scope of the callback function (don't use <a class="el" href="group__PIN__CONTROL.html#gade9cf860942a12f2f81eff43be7861f4">PIN_Init()</a>, <a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols()</a>, <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> etc.)</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function to execute when starting to attach </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status of attach request (ATTACH_STATUS)</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The vm and pin client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> IA32, Intel64<br  />
</dd></dl>

</div>
</div>
<a id="gababd11163709312e34584227d6a3994a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gababd11163709312e34584227d6a3994a">&#9670;&nbsp;</a></span>PIN_AttachProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CONTROL.html#ga04847a38918bb66387b616e2dac6e291">ATTACH_STATUS</a> PIN_AttachProbed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gab167aa6770e560c4cae763d950104e18">ATTACH_PROBED_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initiate Pin attach request in probe mode. If Pin was not detached (using <a class="el" href="group__PIN__CONTROL.html#gaf2fdaea6bac0c3a75e73d2692fd16b8e">PIN_DetachProbed()</a>) this function will be ignored.<br  />
The given notification function will be called immediately after Pin regain control of the application. It is expected that in the scope of this callback, the tool will register callbacks (e.g. <a class="el" href="group__IMG.html#ga4a067152140ead3e23279ab2bd6cd723">IMG_AddInstrumentFunction()</a>) and will reconfigure itself (if needed). In order to change tool's <a class="el" href="classKNOB.html">KNOB</a> value, use <a class="el" href="group__KNOBS.html">KNOB: Commandline Option Handling</a></p>
<dl class="section note"><dt>Note</dt><dd>Pin's state can't be reconfigured in the scope of the callback function (don't use <a class="el" href="group__PIN__CONTROL.html#gade9cf860942a12f2f81eff43be7861f4">PIN_Init()</a>, <a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols()</a>, <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> etc.)</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function to execute when starting to attach </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status of attach request (ATTACH_STATUS)</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The vm and pin client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> IA32, Intel64<br  />
</dd></dl>

</div>
</div>
<a id="ga38f5a396edc14c80c3bd2c0b91084153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga38f5a396edc14c80c3bd2c0b91084153">&#9670;&nbsp;</a></span>PIN_CallApplicationFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_CallApplicationFunction </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structCONTEXT.html">CONTEXT</a> *&#160;</td>
          <td class="paramname"><em>ctxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a>&#160;</td>
          <td class="paramname"><em>cstype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AFUNPTR&#160;</td>
          <td class="paramname"><em>origFunPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCALL__APPLICATION__FUNCTION__PARAM.html">CALL_APPLICATION_FUNCTION_PARAM</a> *&#160;</td>
          <td class="paramname"><em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API allows a tool to call a function inside the application. The function is executed under control of Pin's JIT compiler, and the application code is instrumented normally. Tools should not make direct calls to application functions when Pin is in JIT mode.</p>
<p><a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction()</a> can be called from a replacement routine or an analysis routine, but not from a call-back. Note that this API can result in recursive execution in the tool since the called application function is also instrumented.</p>
<p>One usage model for this API is to "wrap" an application function, executing analysis code before the function is called and after it returns. To do this, use <a class="el" href="group__RTN.html#gac9e6bf0201c6aec380fe607a76bce2e2">RTN_ReplaceSignature()</a> to replace the application function, use <a class="el" href="group__INST__ARGS.html#gga089c27ca15e9ff139dd3a3f8a6f8451da0425900c8991df5d840dd6d9f9b03295">IARG_ORIG_FUNCPTR</a> to pass the original function pointer to the replacement routine, and use <a class="el" href="group__INST__ARGS.html#gga089c27ca15e9ff139dd3a3f8a6f8451dad3e65d643a63acb09d12b8538434ca45">IARG_CONST_CONTEXT</a> to pass the register state. You can then call back on the original function from your replacement routine with <a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction()</a>. Note, however, that the overhead of <a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction()</a> can be high, so it is more efficient to use *_InsertCall() instead if possible.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>The application register state to use when calling the function. Pin changes the register state in order to pass arguments to the function, but the <em>ctxt</em> parameter isn't changed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The Pin id of the current thread (see <a class="el" href="group__INST__ARGS.html#gga089c27ca15e9ff139dd3a3f8a6f8451daadb6e5681193cc8435b9e57d13acf5d4">IARG_THREAD_ID</a>). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cstype</td><td>The calling standard used for calling this function (CALLINGSTD_DEFAULT recommended). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">origFunPtr</td><td>The entry point of the application function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">param</td><td>Additional parameters to define the exact behavior of this function invocation (or NULL for using the defaults). See <a class="el" href="structCALL__APPLICATION__FUNCTION__PARAM.html">CALL_APPLICATION_FUNCTION_PARAM</a> . </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>List of function argument type and size.</td></tr>
  </table>
  </dd>
</dl>
<p>See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a> for the recommended method of passing function arguments. <a class="el" href="group__PROTO.html#gaeebb4a42707b704ebf214a06a6bf4e62">PIN_PARG_END()</a> must end the argument list, even if the function has no arguments. If the application function has a return value, it must appear first in the argument list.</p>
<dl class="section note"><dt>Note</dt><dd>The vm lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT only<br  />
<b>O/S</b>: Linux and Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga81eca939c7f3a6e3b83d06738ea2f67f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga81eca939c7f3a6e3b83d06738ea2f67f">&#9670;&nbsp;</a></span>PIN_CheckReadAccess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_CheckReadAccess </td>
          <td>(</td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given an address, this API checks whether the memory page which contains this address has a read access protection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>memory address</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the memory page which contains the given address has a read access protection, false otherwise.</dd></dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__PIN__CONTROL.html#ga81eca939c7f3a6e3b83d06738ea2f67f">PIN_CheckReadAccess()</a> should not be called before the application has been started. For instance, it cannot be called in an Image load callback. Unexpected results will occur.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga038d6b330dc2b8d3e1efe8e3bfd6ff88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga038d6b330dc2b8d3e1efe8e3bfd6ff88">&#9670;&nbsp;</a></span>PIN_CheckWriteAccess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_CheckWriteAccess </td>
          <td>(</td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given an address, this API checks whether the memory page which contains this address has a write access protection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>memory address</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the memory page which contains the given address has a write access protection, false otherwise.</dd></dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__PIN__CONTROL.html#ga038d6b330dc2b8d3e1efe8e3bfd6ff88">PIN_CheckWriteAccess()</a> should not be called before the application has been started. For instance, it cannot be called in an Image load callback. Unexpected results will occur.</dd>
<dd>
PIN_CheckWriteAccess assume that if a memory page has a write access protection it also has a read</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga614df849c7bcb0f5ad0c01f98b39dad3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga614df849c7bcb0f5ad0c01f98b39dad3">&#9670;&nbsp;</a></span>PIN_CreateDefaultConfigurationInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a> PIN_CreateDefaultConfigurationInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates an instance of PIN_CONFIGURATION_INFO with default values. This instance can be passed to <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a> in order to take effect on Pin.</p>
<p>The default values are:</p><ul>
<li>Callback types which are allowed to run concurrently - None (PIN_CALLBACK_TYPE_NONE)</li>
</ul>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga10440b20ad6bfca57c18652f61031731"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga10440b20ad6bfca57c18652f61031731">&#9670;&nbsp;</a></span>PIN_Detach()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_Detach </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pin relinquishes control of the application and the original un-instrumented code is executed.</p>
<p>On Linux, the function may be invoked from analysis, instrumentation or callback routines. It may be executed by any thread, including threads spawned by the Pintool which are invisible to the Pin VM.</p>
<p>On Windows and macOS*, the function must be invoked from an analysis routine. Invoking the function from instrumentation routines could cause Pin to misbehave. See Tests/detach.C for an example of its use.</p>
<p>The request for detach is considered by Pin as asynchronous. This means that Pin will perform the detach procedure at a point which it considers convenient to do so. From the user's perspective, instrumentation, analysis or callback routines might still be executed after calling <a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach()</a>. In practice, <a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach()</a> simply registers the request to the Pin VM and exits immediately i.e. the function does not wait for detach to complete.</p>
<p>Once Pin starts the detach procedure, it can't be blocked, and will not run forever. It is not possible to detach one thread. All threads will run natively after <a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach()</a>. During detach, Pin doesn't free memory used for Pin objects. This memory will be used during re-attach.</p>
<p>During the detach procedure Pin runs an auxiliary process, which communicates with the running application process via debug interface. The auxiliary process is temporary and will exit immediately when the detach procedure is completed. For the user, this means that a debugger cannot be attached to the application process during detach.</p>
<p>Use <a class="el" href="group__PIN__CONTROL.html#ga7501b4226bc92f358b7b361eea0929d2">PIN_AddDetachFunction()</a> to receive a notification just prior to detach. The callback will be received after all the threads are stopped inside the VM and no more instrumentation functions, analysis routines or callbacks will be called.<br  />
Note: at this point, the auxiliary process mentioned above is still attached to the application process.</p>
<dl class="section note"><dt>Note</dt><dd>The vm and client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows, &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaf2fdaea6bac0c3a75e73d2692fd16b8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf2fdaea6bac0c3a75e73d2692fd16b8e">&#9670;&nbsp;</a></span>PIN_DetachProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_DetachProbed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initiate Pin detach request in probe mode. In the scope of this operation, Pin removes all probes set by Pin &amp; tool, The user can get a notification when the detach operation has been completed (via callback registration using <a class="el" href="group__PIN__CONTROL.html#ga4710100bcce91bdc5fc67bf8f918123a">PIN_AddDetachFunctionProbed()</a>). On Linux, the user can get additional per-thread callbacks just prior to probes removal. (via callback registration using <a class="el" href="group__PIN__CONTROL.html#ga31c0ce7e402dbbd3c5fc4b926a5ef391">PIN_AddThreadDetachProbedFunction()</a>).These callbacks will be given for each thread in its native context. If Pin has already detached (using <a class="el" href="group__PIN__CONTROL.html#gaf2fdaea6bac0c3a75e73d2692fd16b8e">PIN_DetachProbed()</a>), or if Pin has not fully started yet (the notification function registered by <a class="el" href="group__PIN__CONTROL.html#ga785776d108a7843f983698509eceefc9">PIN_AddApplicationStartFunction()</a> was not yet delivered to the tool), this function will be ignored.<br  />
 </p><dl class="section note"><dt>Note</dt><dd>Even though Pin removes all probes, replacement functions can still be active (for example, if the replacement function is still located on the call stack of one of the threads). It is the tool responsibility to handle these scenarios.<br  />
</dd>
<dd>
The vm and pin client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Linux, Windows, &amp; macOS*<br  />
<b>CPU:</b> IA32, Intel64<br  />
</dd></dl>

</div>
</div>
<a id="gabd8df83bbd040dfaf019bf18ec072b92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd8df83bbd040dfaf019bf18ec072b92">&#9670;&nbsp;</a></span>PIN_FetchCode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t PIN_FetchCode </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>copyBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const VOID *&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>maxSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *&#160;</td>
          <td class="paramname"><em>pExceptInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A function to fetch the code raw bytes.</p>
<p>This function should be used when the tool needs the raw bytes of instructions and the tool is using a code fetcher function that translates the original code address to an actual code address.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">copyBuf</td><td>destination buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>address to copy from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">maxSize</td><td>number of bytes to copy </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pExceptInfo</td><td>pointer to the structure that receives the exception information</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga6039144b83fc21c5482e16522e700c91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6039144b83fc21c5482e16522e700c91">&#9670;&nbsp;</a></span>PIN_GetAuxVectorValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ADDRINT PIN_GetAuxVectorValue </td>
          <td>(</td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>found</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given an aux vector entry type, returns the entry's value.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The type of the desired auxv entry. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">found</td><td>True if the entry was found, false otherwise.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the aux vector entry, undefined if .</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT/Probe<br  />
<b>O/S</b>: Linux <b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga34b3940069a6c996249af9681348b31e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34b3940069a6c996249af9681348b31e">&#9670;&nbsp;</a></span>PIN_GetInitialThreadCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT32 PIN_GetInitialThreadCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function is useful when the tool that use attach is doing some initial work that needs the number of threads at the time of the attach.</p>
<dl class="section return"><dt>Returns</dt><dd>Number of threads at the time of the attach, in all other cases it will return one. It is not implemented for Windows with attach.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT/Probe<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga438d523bfee1f6296d252508ec564ac6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga438d523bfee1f6296d252508ec564ac6">&#9670;&nbsp;</a></span>PIN_GetMemoryAddressTransFunction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CONTROL.html#ga3a5f26e35e32bc5e99d101995339bd73">MEMORY_ADDR_TRANS_CALLBACK</a> PIN_GetMemoryAddressTransFunction </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the Registered notification function that is called when tool needs to modify memory address in PIN.<br  />
 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>Call back function has no parameters </td></tr>
    <tr><td class="paramname">val</td><td>Value to be passed to fun when it is called </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; PROBE<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gade9cf860942a12f2f81eff43be7861f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gade9cf860942a12f2f81eff43be7861f4">&#9670;&nbsp;</a></span>PIN_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_Init </td>
          <td>(</td>
          <td class="paramtype">INT32&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CHAR **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize Pin system. Must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram</a> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>argc value passed to main </td></tr>
    <tr><td class="paramname">argv</td><td>argv value passed to main, encoded in UTF8 (a superset of ASCII)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if an error was detected parsing the command line</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga5a74f4530db5d94bede1391c59e39939"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5a74f4530db5d94bede1391c59e39939">&#9670;&nbsp;</a></span>PIN_InitSymbols()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_InitSymbols </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize symbol table code. Pin does not read symbols unless this is called. Must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram</a></p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gadeaa38396564e0afbd701fce28131937"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadeaa38396564e0afbd701fce28131937">&#9670;&nbsp;</a></span>PIN_InitSymbolsAlt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_InitSymbolsAlt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga32ad8725a818ddded04963a3b35a317c">SYMBOL_INFO_MODE</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize symbol table code with an explicitly specified mode of symbol support. <br  />
Pin does not read symbols unless this is called. <br  />
Must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram</a>. <br  />
Alternative to <a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols()</a> on Windows &amp; Linux. <br  />
On macOS* it is implemented as <a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols()</a> <br  />
 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Explicit mode of symbol support. Valid values: <br  />
 EXPORT_SYMBOLS Only symbols taken from export table are provided. Line information is not available (Windows only). <br  />
 DEBUG_SYMBOLS Currently treated the same as DEBUG_OR_EXPORT_SYMBOLS (Windows only). <br  />
 IFUNC_SYMBOLS IFUNC symbols (Linux only). <br  />
 DEBUG_OR_EXPORT_SYMBOLS First debug symbols if available, otherwise export symbols. This mode is set by <a class="el" href="group__PIN__CONTROL.html#ga5a74f4530db5d94bede1391c59e39939">PIN_InitSymbols()</a> (Windows only) <br  />
 This parameter is ignored on operating systems other than Windows &amp; Linux. <br  />
 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the operation succeeded <br  />
 </dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows, Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga7d4d951d45a58249064a42396f4b6610"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d4d951d45a58249064a42396f4b6610">&#9670;&nbsp;</a></span>PIN_InsertCallProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_InsertCallProbed </td>
          <td>(</td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AFUNPTR&#160;</td>
          <td class="paramname"><em>funptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Insert a call to an analysis routine relative to a location. In this location we expect to find a safe instruction, i.e. an instruction which is large enough to be replaced entirely with a jump instruction (i.e. 5/7 bytes long), it is not a control flow instruction, and it doesn't have memory operand.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>the application address to instrument </td></tr>
    <tr><td class="paramname">funptr</td><td>the analysis function </td></tr>
    <tr><td class="paramname">...</td><td><a class="el" href="group__INST__ARGS.html#ga089c27ca15e9ff139dd3a3f8a6f8451d">IARG_TYPE</a>. The list must end with IARG_END.</td></tr>
  </table>
  </dd>
</dl>
<p><a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> must be used when using this API.</p>
<p>Some restrictions apply when using IARG_CONTEXT. See <a class="el" href="group__INST__ARGS.html">Instrumentation arguments</a> for more information. IARG_THREAD_ID is not supported.</p>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: All<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga3463df5a1390b87e8a4568d6f2f43df9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3463df5a1390b87e8a4568d6f2f43df9">&#9670;&nbsp;</a></span>PIN_InterceptSignal()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_InterceptSignal </td>
          <td>(</td>
          <td class="paramtype">INT32&#160;</td>
          <td class="paramname"><em>sig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#gae2eccf99d56cf9ac54001dc2f1c7a559">INTERCEPT_SIGNAL_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Establish an interceptor function for signals delivered to the application. Tools should never call sigaction() directly to handle signals. The interceptor function is called whenever the application receives the requested signal, regardless of whether the application has a handler for that signal. The tool's handler can then decide whether the signal should be forwarded to the application.</p>
<p>There are two intended usage models for this API, which are both advanced features. If your tool merely needs to be notified of signals that are sent to the application, use <a class="el" href="group__PIN__CONTROL.html#ga1cc0f28140cb83a035ebabdddf81861f">PIN_AddContextChangeFunction()</a> instead.</p>
<p>In one usage model, a tool can take over ownership of a signal in order to use the signal as an asynchronous communication mechanism to the outside world. For example, if a tool intercepts SIGUSR1, a user of the tool could send this signal and tell the tool to do something. In this usage model, the tool may want to call <a class="el" href="group__PIN__CONTROL.html#ga5dcf8bb7f5a70b12746c18bbbe5668f9">PIN_UnblockSignal()</a> so that it will receive the signal even if the application attempts to block it.</p>
<p>In the second usage model, the tool may need to "squash" certain signals that the application generates. For example, a tool that forces speculative execution in the application may want to intercept and squash exceptions generated in the speculative code.</p>
<p>A tool can set only one "intercept" handler for a particular signal, so a new handler overwrites any previous handler for the same signal. To disable a handler, pass a NULL function pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sig</td><td>The signal number to intercept, which may not be SIGKILL or SIGSTOP. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The tool's intercept function, or NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the intercept function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE on success (always FALSE on Windows).</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga7ff2e9b5b14feb3dc3102c9a34d24ff7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ff2e9b5b14feb3dc3102c9a34d24ff7">&#9670;&nbsp;</a></span>PIN_IsActionPending()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_IsActionPending </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function is useful when an analysis routine might block for an indefinite period of time. In such cases, the analysis code can periodically call <a class="el" href="group__PIN__CONTROL.html#ga7ff2e9b5b14feb3dc3102c9a34d24ff7">PIN_IsActionPending()</a> to see if the thread has some pending action that needs to be handled in the Pin VM. If so, the analysis routine should return back to the VM, either by returning or by calling <a class="el" href="group__CONTEXT.html#gade2217c59d6e6b5cad08a59afe3d879a">PIN_ExecuteAt()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The ID of the calling thread.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the thread has a pending action in the Pin VM.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gaad2d0a8d8dca408952f4a48ebcd0a2a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaad2d0a8d8dca408952f4a48ebcd0a2a3">&#9670;&nbsp;</a></span>PIN_IsAttaching()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_IsAttaching </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>TRUE if Pin is being attached to a running application process </dd></dl>

</div>
</div>
<a id="gafe7c14403bb052dab2caf316db743684"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe7c14403bb052dab2caf316db743684">&#9670;&nbsp;</a></span>PIN_IsProbeMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_IsProbeMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Return TRUE if -probe on command line or if Tool started application calling <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">.\n</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Tool can run in Probe mode without specifying -probe on the command line. This switch is provided as a convenience. In that case, <a class="el" href="group__PIN__CONTROL.html#gafe7c14403bb052dab2caf316db743684">PIN_IsProbeMode()</a> will return FALSE before <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> was called (Since the default running mode is JIT).</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga5804cf309051f916da872b279ca46568"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5804cf309051f916da872b279ca46568">&#9670;&nbsp;</a></span>PIN_IsSafeForProbedInsertion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_IsSafeForProbedInsertion </td>
          <td>(</td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check if the given location is safe for probe insertion. This means that the location contains an instruction which is large enough to be replaced entirely with a jump instruction (i.e. 5/7 bytes long), it is not a control flow instruction, and it doesn't have memory operand.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>the application address to instrument </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE/FALSE if the location is safe</dd></dl>
<p><a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> must be used when using this API.</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: All<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga49581d3c0504c1b73c135c2ea58ce514"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga49581d3c0504c1b73c135c2ea58ce514">&#9670;&nbsp;</a></span>PIN_LockClient()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_LockClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Some Pin API functions may only be called when the thread is holding this lock. See also <a class="el" href="group__PIN__CONTROL.html#ga28de790a20fcd1a8fd572a96e9c0064b">PIN_UnlockClient</a>. The client lock is recursive, so can be claimed again by a thread if it already holds it. PIN_LockClient and PIN_UnlockClient calls must be matched, since the lock implementation maintains a depth count.<br  />
This function can be used in any thread, including internal threads spawned by the tool.</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gabcb114d9f01002dac1be6607da8b7c2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabcb114d9f01002dac1be6607da8b7c2c">&#9670;&nbsp;</a></span>PIN_RemoveFiniFunctions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_RemoveFiniFunctions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Invalidates all the Fini callback functions registered via <a class="el" href="group__PIN__CONTROL.html#gaa78c7b560975a6feffa420fadedc0627">PIN_AddFiniFunction</a>; Fini callbacks will no longer be called before the application exits.</p>
<p>Must be called prior to invoking <a class="el" href="group__PIN__CONTROL.html#ga10440b20ad6bfca57c18652f61031731">PIN_Detach</a> if the tool has previously registered Fini callbacks and libc.so is not yet loaded into memory yet for a dynamically linked binary.</p>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga8fb8aae9e4b8012ab3c00225761c7785"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8fb8aae9e4b8012ab3c00225761c7785">&#9670;&nbsp;</a></span>PIN_RemoveInstrumentation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_RemoveInstrumentation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>All instrumentation is removed. When application code is executed the instrumentation routines will be called to reinstrument all code. Similarly, any ahead-of-time instrumentation will be reapplied if the relevant code is re-executed.</p>
<dl class="section note"><dt>Note</dt><dd>The vm lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga40c83d7076e7be3ebc6cc8eff6cd6a6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga40c83d7076e7be3ebc6cc8eff6cd6a6a">&#9670;&nbsp;</a></span>PIN_RemoveInstrumentationInRange()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_RemoveInstrumentationInRange </td>
          <td>(</td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes all instrumentation from the given range [start,end]. If the application reaches this range again, the code will be reinstrumented. Can be called from an analysis function or a callback. Note: Some code beyond the start and end margins may be reinstrumented as well.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">start</td><td>The starting address of the range </td></tr>
    <tr><td class="paramname">end</td><td>The ending address (inclusive) of the range</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The vm lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga1225706d213f4bd1d81ed1fb32e792d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1225706d213f4bd1d81ed1fb32e792d7">&#9670;&nbsp;</a></span>PIN_SafeCopy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t PIN_SafeCopy </td>
          <td>(</td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const VOID *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy the specified number of bytes from a source memory region to a destination memory region. The function guarantees safe return to the caller even if the source or destination regions are inaccessible (entirely or partially).</p>
<p>Tools should use this function to ensure safe access to the original content of the application's memory. For example, on Windows, Pin replaces certain TEB fields when running analysis routines in the tool. If the tool accesses these fields directly, it would see the values assigned by Pin rather than the original ones. On the contrary, <a class="el" href="group__PIN__CONTROL.html#ga1225706d213f4bd1d81ed1fb32e792d7">PIN_SafeCopy()</a> always reads and modifies the original application's values of these fields.</p>
<p>This function can be used in any thread, including any internal thread spawned by the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>destination region </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>region to copy from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to copy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes successfully copied from the source to the destination region.</dd></dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__PIN__CONTROL.html#ga1225706d213f4bd1d81ed1fb32e792d7">PIN_SafeCopy()</a> should not be called before the application has been started. For instance, it cannot be called in an Image load callback. Unexpected results will occur.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga9ca9a29ec02d848dd7b95717f400098c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ca9a29ec02d848dd7b95717f400098c">&#9670;&nbsp;</a></span>PIN_SafeCopyEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t PIN_SafeCopyEx </td>
          <td>(</td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const VOID *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structEXCEPTION__INFO.html">EXCEPTION_INFO</a> *&#160;</td>
          <td class="paramname"><em>pExceptInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy the specified number of bytes from a source memory region to a destination memory region. The function guarantees safe return to the caller even if the source or destination regions are inaccessible (entirely or partially).</p>
<p>In addition to the <a class="el" href="group__PIN__CONTROL.html#ga1225706d213f4bd1d81ed1fb32e792d7">PIN_SafeCopy</a> functionality, this function allows the tool to obtain detailed exception information in case of failure.</p>
<p>This function can be used in any thread, including any internal thread spawned by the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>destination region </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>region to copy from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to copy </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pExceptInfo</td><td>pointer to the structure that receives the exception information in case of failure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes successfully copied from the source to the destination region. If the function fails to copy all bytes, it provides detailed description of the failure in the <em></em> &lt;pExceptInfo&gt; structure.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The exception address in the returned exception information always has zero value. If the tool wants to raise this exception on behalf of the application, it should use <a class="el" href="group__EXCEPTION.html#ga397741c75f32043c9fcf6525f668678a">PIN_SetExceptionAddress</a> function to set an appropriate exception address before passing the exception information to the <a class="el" href="group__EXCEPTION.html#ga35d13dc3ce578945eda8228b0db1c138">PIN_RaiseException</a> function.</dd>
<dd>
<a class="el" href="group__PIN__CONTROL.html#ga9ca9a29ec02d848dd7b95717f400098c">PIN_SafeCopyEx()</a> should not be called before the application has been started. For instance, it cannot be called in an Image load callback. Unexpected results will occur.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaaf30fb0e2832f9ce1016b9c751547d17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaf30fb0e2832f9ce1016b9c751547d17">&#9670;&nbsp;</a></span>PIN_SetAllowedConcurrentCallbacks()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_SetAllowedConcurrentCallbacks </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a>&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga4e114852e46d5d839d6e71e242709777">PIN_CALLBACK_TYPE</a>&#160;</td>
          <td class="paramname"><em>callbackType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enables/disables concurrent delivery of certain callbacks in a specific PIN_CONFIGURATION_INFO instance.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>The <a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a> instance to modify. </td></tr>
    <tr><td class="paramname">callbackType</td><td>Specifies which Pin callbacks are allowed to be delivered concurrently:<br  />
<br  />
 In the case where a callback should be delivered to several threads at a given moment, delivering a callback concurrently means that each thread is free to deliver its the respective callbacks without waiting for the other threads. This means that Pin doesn't acquire any exclusive internal lock in order to deliver a concurrent callback<br  />
<br  />
 In constrast, delivering a callback in a serialized way means that, in a given moment, only one threads is allowed to deliver any type of callback. Serializing the callback might hurt the performance of your Pin tool, but it will protect the tool against possibly race conditions in your tool. When a callback is considered "serialized", Pin will acquire an exclusive internal lock before delivering the callback to the tool.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In order for this option to take effect the <a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a> must be passed to <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>.</dd>
<dd>
Currently, other types of callbacks (which don't have a respective enum entry in <a class="el" href="group__PIN__CONTROL.html#ga4e114852e46d5d839d6e71e242709777">PIN_CALLBACK_TYPE</a>) are serialized by Pin with no option to change that.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga33db0442eb244110a6355ddc4d98cab8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga33db0442eb244110a6355ddc4d98cab8">&#9670;&nbsp;</a></span>PIN_SetReplayMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_SetReplayMode </td>
          <td>(</td>
          <td class="paramtype">UINT32&#160;</td>
          <td class="paramname"><em>flags</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tell Pin to execute different sets of operations in replay mode.</p>
<p>The only flag currently supported is REPLAY_MODE_IMAGEOPS which disables Pin's normal detection of image load and unload events, which are expected to be replayed through the <a class="el" href="group__REPLAY.html#ga07759b799516b378bd7f3faa0a0a8325">IMG_ReplayImageLoad</a> and <a class="el" href="group__REPLAY.html#ga67068d9c22e4da2fb9522098dcf18bde">IMG_ReplayImageUnload</a> calls. It also avoids Pin loading information about the initial image given on the command line.</p>
<p>Other flags may be added as required in the future.</p>
<p>Must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>A mask created from the PIN_REPLAY_MODE_FLAGS enum describing the operations the replayer will take control of.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux (others later)<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaea4e808e786d55b6f833e087586548ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaea4e808e786d55b6f833e087586548ff">&#9670;&nbsp;</a></span>PIN_SetSmcSupport()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_SetSmcSupport </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga1079583ef7d0d89098794aaafc2cdd7f">SMC_ENABLE_DISABLE_TYPE</a>&#160;</td>
          <td class="paramname"><em>enable_disable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable/Disable Pin's support of self modifying code When enabled, Pin will detect self modification of code and will deliver a callback, if one is registered, when such an event happens. When disabled and if SMC occurs, the SMC will not be detected and the original code will continue to execute. This function takes precedence over the specification of smc_support in the invocation line. This function must be called before PIN_StartProgram.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>SMC_ENABLE, or SMC_DISABLE</td></tr>
  </table>
  </dd>
</dl>
<p>SMC support is enabled by default</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Windows, Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gab466cd00518ff315446c92f98f7ea1a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab466cd00518ff315446c92f98f7ea1a0">&#9670;&nbsp;</a></span>PIN_StartProgram()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_StartProgram </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga943bbe3eeb81be27f127382e4b3f82bb">PIN_CONFIGURATION_INFO</a>&#160;</td>
          <td class="paramname"><em>options</em> = <code><a class="el" href="group__PIN__CONTROL.html#ga614df849c7bcb0f5ad0c01f98b39dad3">PIN_CreateDefaultConfigurationInfo</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Starts executing the application, when Pin is in JIT mode, which is the default. Note that <a class="el" href="group__PIN__CONTROL.html#gade9cf860942a12f2f81eff43be7861f4">PIN_Init()</a> must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>Pin global configuration to use in this run of Pin. These configuration options are set only once (during the call of <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>), and they are affecting the entire execution of Pin.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a> function never returns. It also unwinds the tool's stack, so any local (stack based) variables are lost.</dd>
<dd>
The vm and pin client locks are obtained during the call of this API.</dd></dl>
<p>See also: <a class="el" href="group__PIN__CONTROL.html#ga614df849c7bcb0f5ad0c01f98b39dad3">PIN_CreateDefaultConfigurationInfo()</a>.</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga2e545d491302b50ea78c1bb844a8b544"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e545d491302b50ea78c1bb844a8b544">&#9670;&nbsp;</a></span>PIN_StartProgramProbed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_StartProgramProbed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Starts executing the application, when Pin is in Probe mode. Note that <a class="el" href="group__PIN__CONTROL.html#gade9cf860942a12f2f81eff43be7861f4">PIN_Init()</a> must be called before <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a>.</p>
<p>The <a class="el" href="group__PIN__CONTROL.html#ga2e545d491302b50ea78c1bb844a8b544">PIN_StartProgramProbed()</a> function never returns. It also unwinds the tool's stack, so any local (stack based) variables are lost.</p>
<dl class="section note"><dt>Note</dt><dd>The vm and pin client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga3c221c041135a3a62384cde05828e785"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3c221c041135a3a62384cde05828e785">&#9670;&nbsp;</a></span>PIN_ToolFullPath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const CHAR* PIN_ToolFullPath </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns full path of main Pin tool binary image, encoded in UTF8 (superset of ASCII).</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gab6d4fa955364407511e161e7ed81d65d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab6d4fa955364407511e161e7ed81d65d">&#9670;&nbsp;</a></span>PIN_TryEnd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_TryEnd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister the last registered notification function (registered via <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a>) from the context of the calling thread. This function should be called in the same function scope as the previously registered <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">.\n</a> This function can be used in any thread, including any internal thread spawned by the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Id of the calling thread.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga745439a3c54413e886db6676ff6a8bae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga745439a3c54413e886db6676ff6a8bae">&#9670;&nbsp;</a></span>PIN_TryStart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_TryStart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PIN__CONTROL.html#ga48e4c80589225d40efe177a9d399225c">INTERNAL_EXCEPTION_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a per-thread notification handler function that is called upon receipt of an internal exception in pin or the tool in the context of the calling thread. Use <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a> in order to remove the registered handler from the context of the calling thread (do it in the same function scope). The user can register up to MAX_IEH_CALLBACKS per-thread notification functions.<br  />
This function can be used in any thread, including any internal thread spawned by the tool.</p>
<dl class="section note"><dt>Note</dt><dd>It is unsupported to call <a class="el" href="group__PIN__CONTROL.html#ga38f5a396edc14c80c3bd2c0b91084153">PIN_CallApplicationFunction()</a> in the scope of <a class="el" href="group__PIN__CONTROL.html#ga745439a3c54413e886db6676ff6a8bae">PIN_TryStart()</a> / <a class="el" href="group__PIN__CONTROL.html#gab6d4fa955364407511e161e7ed81d65d">PIN_TryEnd()</a> pair.<br  />
</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Id of the calling thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>Handler function to execute upon receipt of internal exception in pin/tool. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the handler function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Windows, Linux<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga5dcf8bb7f5a70b12746c18bbbe5668f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5dcf8bb7f5a70b12746c18bbbe5668f9">&#9670;&nbsp;</a></span>PIN_UnblockSignal()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_UnblockSignal </td>
          <td>(</td>
          <td class="paramtype">INT32&#160;</td>
          <td class="paramname"><em>sig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is normally used in conjunction with <a class="el" href="group__PIN__CONTROL.html#ga3463df5a1390b87e8a4568d6f2f43df9">PIN_InterceptSignal()</a> to prevent the application from blocking a signal that the tool intercepts. This is useful if the tool wants to ensure that the application will not prevent the tool from receiving the intercepted signal.</p>
<p>When this API is called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>, it affects all threads in the application. However, if it is called after <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>, it only affects the calling thread. If the application spawns a thread, the child thread inherits the signal blocking state from its parent.</p>
<p>Tools should take care when using this API because it can adversely affect the application if it also uses the signal <em>sig</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sig</td><td>The signal number, which may not be SIGKILL or SIGSTOP. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>If TRUE, the application is prevented from blocking <em>sig</em>. If FALSE, the application may block or unblock <em>sig</em> at will.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE on success (always FALSE on Windows).</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga28de790a20fcd1a8fd572a96e9c0064b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga28de790a20fcd1a8fd572a96e9c0064b">&#9670;&nbsp;</a></span>PIN_UnlockClient()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_UnlockClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Some Pin API functions may be called only when the thread is holding this lock. See also PIN_LockClient.<br  />
 This function can be used in any thread, including any internal thread spawned by the tool.</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gab50450a575d888a98f46c3c5441aa360"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab50450a575d888a98f46c3c5441aa360">&#9670;&nbsp;</a></span>PIN_Version()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string&amp; PIN_Version </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a fully descriptive Pin version string, including the Intel copyright notice. The returned version is the Pin version that the tool was linked with. </p>

</div>
</div>
<a id="gaf372d34ecbc62763aa07af2b9c24f1ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf372d34ecbc62763aa07af2b9c24f1ea">&#9670;&nbsp;</a></span>PIN_VmFullPath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CHAR* PIN_VmFullPath </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns full path of Pin binary invoked, encoded in UTF8 (superset of ASCII), this is supported for Linux (only for locales encoded in UTF8).</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
